package com.wondedDream.controller.web;

import com.wondedDream.model.MockExamQuestion;
import com.wondedDream.service.MockExamQuestionService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController(value = "webMockExamQuestionController")
@RequestMapping("/web/mockExamQuestions")
@Api(description = "客户端-用户模考问题模块")
public class UserMockExamQuestionController {

    @Autowired
    private MockExamQuestionService mockExamQuestionService;

    // 获取模考问题信息
    @GetMapping("/{id}")
    public MockExamQuestion getMockExamQuestionById(@PathVariable Integer id) {
        return mockExamQuestionService.getMockExamQuestionById(id);
    }

    // 获取某一模考下的模考问题列表
    @GetMapping("/byMockExam/{mockExamId}")
    public List<MockExamQuestion> getMockExamQuestionsByMockExamId(@PathVariable Integer mockExamId) {
        return mockExamQuestionService.getMockExamQuestionsByMockExamId(mockExamId);
    }





}